package com.zzyl.common.core.domain.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用于Swagger文档的模型类
 */
@ApiModel(description = "通用响应结果")
public class SwaggerModels {

    @ApiModel(description = "Ajax结果响应模型")
    public static class AjaxResultResponse {

        @ApiModelProperty(value = "状态码", example = "200", notes = "响应状态码，200表示成功，500表示失败")
        private int code = 200;

        @ApiModelProperty(value = "返回消息", example = "操作成功", notes = "操作结果的描述信息")
        private String msg = "操作成功";

        @ApiModelProperty(value = "返回数据", example = "{}", notes = "具体的业务数据内容")
        private Object data;

        public AjaxResultResponse() {
        }

        public AjaxResultResponse(int code, String msg, Object data) {
            this.code = code;
            this.msg = msg;
            this.data = data;
        }

        // Getters and Setters
        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        public Object getData() {
            return data;
        }

        public void setData(Object data) {
            this.data = data;
        }
    }
}
